/**
 * Generate time : 2011-12-15 11:13:09
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEEquipmentClass table comment : 设备分类
 */
public class ZMCEEquipmentClass extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdCode = " "; /* 编号 */
	private String fdName = " "; /* 名称 */
	private String fdParentId = " "; /* 上级类别ID */
	private String fdParentName = " "; /* 父级名称 */
	private String fdParentToencode = " "; /* 父级内码 */
	private String fdIsLeaf = " "; /* 是否叶子 */
	private String fdRemarks = " "; /* 备注 */
	private String fdToencode = " "; /* 内码 */
	private String fdSuffix = " ";		/* 设备分类尾码*/	

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCode");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("上级类别ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParentName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("父级类别名");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParentToencode");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("父级内码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdIsLeaf");
		eiColumn.setFieldLength(1);
		// eiColumn.setType("N");
		eiColumn.setDescName("是否叶子");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdToencode");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("内码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSuffix");
		eiColumn.setFieldLength(10);	
		eiColumn.setDescName("设备分类尾码");
		eiMetadata.addMeta(eiColumn);
	}

	/**
	 * the constructor
	 */
	public ZMCEEquipmentClass() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdCode - 编号
	 * 
	 * @return the fdCode
	 */
	public String getFdCode() {
		return this.fdCode;
	}

	/**
	 * set the fdCode - 编号
	 */
	public void setFdCode(String fdCode) {
		this.fdCode = fdCode;
	}

	/**
	 * get the fdName - 名称
	 * 
	 * @return the fdName
	 */
	public String getFdName() {
		return this.fdName;
	}

	/**
	 * set the fdName - 名称
	 */
	public void setFdName(String fdName) {
		this.fdName = fdName;
	}

	/**
	 * get the fdParentId - 上级类别ID
	 * 
	 * @return the fdParentId
	 */
	public String getFdParentId() {
		return this.fdParentId;
	}

	/**
	 * set the fdParentId - 上级类别ID
	 */
	public void setFdParentId(String fdParentId) {
		this.fdParentId = fdParentId;
	}

	/**
	 * get the fdIsLeaf - 是否叶子
	 * 
	 * @return the fdIsLeaf
	 */
	public String getFdIsLeaf() {
		return this.fdIsLeaf;
	}

	/**
	 * set the fdIsLeaf - 是否叶子
	 */
	public void setFdIsLeaf(String fdIsLeaf) {
		this.fdIsLeaf = fdIsLeaf;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * @return the fdParentName
	 */
	public String getFdParentName() {
		return fdParentName;
	}

	/**
	 * @param fdParentName
	 *            the fdParentName to set
	 */
	public void setFdParentName(String fdParentName) {
		this.fdParentName = fdParentName;
	}

	/**
	 * get the fdToencode 内码
	 * 
	 * @return the fdToencode
	 */
	public String getFdToencode() {
		return this.fdToencode;
	}

	/**
	 * set the fdToencode 内码
	 */
	public void setFdToencode(String fdToencode) {
		this.fdToencode = fdToencode;
	}

	/**
	 * get the fdToencode 父级内码
	 * 
	 * @return the fdToencode
	 */
	public String getFdParentToencode() {
		return this.fdParentToencode;
	}

	/**
	 * set the fdToencode 父级内码
	 */
	public void setFdParentToencode(String fdParentToencode) {
		this.fdParentToencode = fdParentToencode;
	}
	
	/**
	 * get the fdSuffix - 设备分类尾码
	 * @return the fdSuffix
	 */
	public String getFdSuffix() {
		return this.fdSuffix;
	}
	
	/**
	 * set the fdSuffix - 设备分类尾码
	 */
	public void setFdSuffix(String fdSuffix) {
		this.fdSuffix = fdSuffix;
	}	

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCode")), fdCode));
		setFdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdName")), fdName));
		setFdParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentId")), fdParentId));
		setFdParentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentName")), fdParentName));
		setFdIsLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdIsLeaf")), fdIsLeaf));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
		setFdToencode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdToencode")), fdToencode));
		setFdParentToencode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentToencode")), fdParentToencode));
		setFdSuffix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSuffix")), fdSuffix));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdCode", StringUtils.toString(fdCode, eiMetadata.getMeta("fdCode")));
		map.put("fdName", StringUtils.toString(fdName, eiMetadata.getMeta("fdName")));
		map.put("fdParentId", StringUtils.toString(fdParentId, eiMetadata.getMeta("fdParentId")));
		map.put("fdParentName", StringUtils.toString(fdParentName, eiMetadata.getMeta("fdParentName")));
		map.put("fdIsLeaf", StringUtils.toString(fdIsLeaf, eiMetadata.getMeta("fdIsLeaf")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));
		map.put("fdToencode", StringUtils.toString(fdToencode, eiMetadata.getMeta("fdToencode")));
		map.put("fdParentToencode", StringUtils.toString(fdParentToencode, eiMetadata.getMeta("fdParentToencode")));
		map.put("fdSuffix",StringUtils.toString(fdSuffix, eiMetadata.getMeta("fdSuffix")));	

		return map;

	}
}